package de.oszimtcc.googleapi;

import java.util.ArrayList;
import java.util.List;

import com.google.api.services.calendar.model.CalendarListEntry;
import com.google.api.services.calendar.model.Event;


public class CalendarInfo implements Comparable<CalendarInfo> 
{
	  String id;
	  String summary;
	  CalendarListEntry calendar;
	  List<Event> eventlist = new ArrayList<Event>();

	  public CalendarInfo(CalendarListEntry pCalendar) 
	  {
		  this.calendar = pCalendar;
		  this.id = this.calendar.getId();
		  this.summary = this.calendar.getSummary();
	  }

	  public void AddEvent(Event pToAdd)
	  {
		  this.eventlist.add(pToAdd);
	  }
	  
	  public String getSummary() 
	  {
		  return summary;
	  }
	  
	  public String getId() 
	  {
		  return id;
	  }

	  public int compareTo(CalendarInfo other) 
	  {
		  return summary.compareTo(other.summary);
	  }
}
